package com.netdisk.service;

import java.util.List;

import javax.annotation.Resource;

import com.netdisk.dao.impl.LogDao;
import com.netdisk.entity.BaseNetdiskEntity;
import com.netdisk.entity.Log;
/**
 * 父Dao类
 * @author chenlong
 *2013-4-13
 */
public abstract class Service<T extends BaseNetdiskEntity> {
	
	protected LogDao logDao;
	
	public LogDao getLogDao() {
		return logDao;
	}
	
	@Resource(name="logDao")
	public void setLogDao(LogDao logDao) {
		this.logDao = logDao;
	}

	public abstract void save(T obj, Log log);

	public abstract void update(T obj, Log log);
	
	public abstract void delete(T obj, Log log);
	
	public abstract  List<T> findAll();
	
	public abstract  T findById(String id);
	
	public abstract  List<T> findByTop(int from , int max);
}
